﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace Caltech.Models
{
    public class WorkOrderSearchModel : BaseModel
    {
        public int? WorkOrderId { get; set; }
        public string WorkOrderNo { get; set; }
        public DateTime CalibrationDate { get; set; }
        public DateTime NextDueDate { get; set; }
        public string PONumber { get; set; }
        public string CompanyName { get; set; }
        public string SalesmanName { get; set; }
        public bool ShowFullName { get; set; }
        public int Status { get; set; }
        public int TotalUnit { get; set; }
        public string Note { get; set; }

        public string ManagerId { get; set; }
        public UserSearchModel Manager { get; set; }
    }

    public class WorkOrderModel : BaseModel
    {
        public int? WorkOrderId { get; set; }
        public string WorkOrderNo { get; set; }
        public int CompanyId { get; set; }
        public string TechnicianId { get; set; }
        public string Procedure { get; set; }
        public string CalibrationCycle { get; set; }
        public int Status { get; set; }
        public DateTime CalibrationDate { get; set; }
        public DateTime NextDueDate { get; set; }
        public string PONumber { get; set; }
        public UserCompactModel Technician { get; set; }
        public CompanyModel Company { get; set; }
        public SalesmanModel Salesman { get; set; }
        public bool ShowFullName { get; set; }
        public IEnumerable<WorkOrderDetailModel> WorkOrderDetails { get; set; }
        public string Note { get; set; }
        public string ManagerId { get; set; }
        public UserSearchModel Manager { get; set; }
    }

    public class WorkOrderDetailModel : BaseModel
    {
        public string PONumber { get; set; }
        public string Name { get; set; }
        public string Manufacturer { get; set; }
        public string SerialNumber { get; set; }
        public string ModelNumber { get; set; }
        public int EquipmentId { get; set; }
        public int? ServicePlace { get; set; }
        public int Quantity { get; set; }
        public string Description { get; set; }
    }
}